package com.iman.Confucius.vo.student;

import java.util.Date;

public class StudyRemarkVo {
	private String courseName;
	private String  coursePimg;
	private long courseId;
	private int courseSubject;
	private int courseTimes;
	private long category_id;
	private int  progress;
	private int studyTime;
	private Date laststudyDt;
	
	private int timeType;
	private int timeLong;
	
	public int getTimeType() {
		return timeType;
	}
	public void setTimeType(int timeType) {
		this.timeType = timeType;
	}
	public int getTimeLong() {
		return timeLong;
	}
	public void setTimeLong(int timeLong) {
		this.timeLong = timeLong;
	}
	
	public Date getLaststudyDt() {
		return laststudyDt;
	}
	public void setLaststudyDt(Date laststudyDt) {
		if(null!=laststudyDt){
			long lastTime = laststudyDt.getTime();
			long nowTime = System.currentTimeMillis();
			int min = (int) ((nowTime - lastTime)/1000/60);
			if(min < 60){
				timeType = 0;
				timeLong =  min;
			}else if(min > 1440){
				timeType = 2;
				timeLong = min/1440;
			}else {
				timeType = 1;
				timeLong = min/60;
			}
		}
		
		this.laststudyDt = laststudyDt;
	}
	
	public String getCourseName() {
		return courseName;
	}
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	public String getCoursePimg() {
		return coursePimg;
	}
	public void setCoursePimg(String coursePimg) {
		this.coursePimg = coursePimg;
	}
	public long getCourseId() {
		return courseId;
	}
	public void setCourseId(long courseId) {
		this.courseId = courseId;
	}
	public int getCourseSubject() {
		return courseSubject;
	}
	public void setCourseSubject(int courseSubject) {
		this.courseSubject = courseSubject;
	}
	public long getCategory_id() {
		return category_id;
	}
	public void setCategory_id(long category_id) {
		this.category_id = category_id;
	}
	public int getProgress() {
		return progress;
	}
	public void setProgress(int progress) {
		this.progress = progress;
	}
	public int getStudyTime() {
		return studyTime;
	}
	public void setStudyTime(int studyTime) {
		this.studyTime = studyTime;
	}
	@Override
	public String toString() {
		return "StudyRemarkVo [courseName=" + courseName + ", coursePimg="
				+ coursePimg + ", courseId=" + courseId + ", courseSubject="
				+ courseSubject + ", courseTimes=" + courseTimes
				+ ", category_id=" + category_id + ", progress=" + progress
				+ ", studyTime=" + studyTime + ", laststudyDt=" + laststudyDt
				+ "]";
	}
	public int getCourseTimes() {
		return courseTimes;
	}
	public void setCourseTimes(int courseTimes) {
		this.courseTimes = courseTimes;
	}
}
